home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ DirShellEx.xpl < prev    next >
Text File  |  1999-10-11  |  2KB  |  77 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="1"
  3. "COUNT"="4"
  4. "UIPATH"="Appearance\Explorer\Context Menu"
  5. "NAME"="Folders Commands"
  6. "VERSION"="2.23"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="1) Name:"
  9. "TEXT 2"="1) Command:"
  10. "TEXT 3"="2) Name:"
  11. "TEXT 4"="2) Command:"
  12. "DESCRIPTION 1"="This plug-in can be used to add two commands to the context menu that appears if you right-click a folder (directory) in the Explorer."
  13. "DESCRIPTION 2"="First, enter a name for the command (e.g. "View with Explorer") in the field "Name". Then enter the command that should be executed if the item is selected in the field "Command". The name of the current directory can be inserted through "%1" (e.g. explorer.exe "%1")."
  14. "DESCRIPTION 3"="To remove the command again, clear both the "Name" and the "Command" field and press "Apply"."
  15. "DESCRIPTION 4"="An example:"
  16. "DESCRIPTION 5"="1) Name:        View with explorer"
  17. "DESCRIPTION 6"="1) Command:  explorer.exe "%1""
  18. "AUTHOR"="Xteq Systems"
  19. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  20. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  21.  
  22.  
  23. sPath1="HKCR\Directory\Shell\XQXSETCMD1\"
  24. sPath2="HKCR\Directory\Shell\XQXSETCMD2\"
  25. sCMD="Command\@"
  26. Sub Plugin_Initialize
  27.  s=RegReadValue(sPath1 & sCMD)
  28.  if len(s)>0 then
  29.   s=RegReadValue(sPath1 & "@")
  30.   SetUIElement 1,s
  31.  
  32.   s=RegReadValue(sPath1 & sCMD)
  33.   SetUIElement 2,s
  34.  end if
  35.  
  36.  s=RegReadValue(sPath2 & sCMD)
  37.  if len(s)>0 then
  38.   s=RegReadValue(sPath2 & "@")
  39.   SetUIElement 3,s
  40.  
  41.   s=RegReadValue(sPath2 & sCMD)
  42.   SetUIElement 4,s
  43.  end if
  44. End Sub
  45.  
  46. Sub Plugin_CheckData(ElementIndex)
  47. End Sub
  48.  
  49. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  50.  s1=GetUIElement(1)
  51.  s2=GetUIElement(2)
  52.  if len(s1)>0 or len(s2)>0 then
  53.   Call RegWriteValue(sPath1 & sCMD,s2,1)
  54.   Call RegWriteValue(sPath1 & "@",s1,1)
  55.  else
  56.   if IsEmpty(RegReadValue(sPath1 & sCMD))=false then
  57.    Call RegDeletePath(sPath1 & "Command")
  58.    Call RegDeletePath(sPath1)
  59.   end if
  60.  end if
  61.  
  62.  s1=GetUIElement(3)
  63.  s2=GetUIElement(4)
  64.  if len(s1)>0 or len(s2)>0 then
  65.   Call RegWriteValue(sPath2 & sCMD,s2,1)
  66.   Call RegWriteValue(sPath2 & "@",s1,1)
  67.  else
  68.   if IsEmpty(RegReadValue(sPath2 & sCMD))=false then
  69.    Call RegDeletePath(sPath2 & "Command")
  70.    Call RegDeletePath(sPath2)
  71.   end if
  72.  end if
  73. End Sub
  74.  
  75. Sub Plugin_Terminate 
  76. End Sub
  77.